<template lang="jade">
div.search.cbox
	li.input
		dl.cbox.ptype
			dd(v-bind:class="{ 'on': newtype == '1'}",v-on:click="getList('1')") 理财资讯
			dd(v-bind:class="{ 'on': newtype == '2'}",v-on:click="getList('2')") 网贷学堂
			dd(v-bind:class="{ 'on': newtype == '3'}",v-on:click="getList('3')") 评估报告
			dd(v-bind:class="{ 'on': newtype == '4'}",v-on:click="getList('4')") 最新公告
div.newsbanner
	img(src="../../assets/images/banner/1.jpg")

div#newslist.bottom
	ul.news_list
		li(v-link="{ name: 'new' }")
			div.img
				img(src="../../assets/images/news/news-cover.png")
			div.info 
				div.title 关于“鸡惠难得，邀请红包，咱俩都有！
				div.extra
					span.fr 作者:冬冬
					span.fl 2017-01-01


</template>

<script>
import newView from '../../components/index/newlist'
export default{
	data(){
		return{
			newtype:"1",
			busy:true,
			items: [],
			obj: [],
			page:1
		}
	},
    created() {
        this.fetch(1);
    },

	components: {
		new:newView
	},

	methods:{
	    getList: function (key) {
			this.newtype = key;
			this.busy = true;
			//this.items=this.obj=[];
			this.page=1;
	    },
	    fetch: function (page) {
	      var data = {'page': page}
	      /*this.$http({url: Api_Index+'&page='+page+'&tender='+this.productype, method: 'GET'}).then(function (response) {
	        this.productype = response.data.type;
	        this.banlance = response.data.banlance;
	        this.items = this.items.concat(response.data.data);
	        this.obj = Object.assign([], this.obj.concat(response.data.data));
	        this.busy = false;
	      });*/
	    }
	}
}
</script>